#pragma once

namespace _FOGGE_
{
	namespace _UTIL_
	{
		namespace _MATH_
		{
			class Rotator
			{
			public:
				Rotator(void);
				Rotator(float yaw,float pitch,float roll);
				~Rotator(void);

				void set(float yaw,float pitch,float roll);

				void set(Rotator& rot);

				const Rotator& operator=(const Rotator& r);

				const Rotator& operator=(float* r);
				bool isZero()	const
				{
					if(m_fYaw!=0 || m_fPitch!=0 || m_fRoll!=0)	return false;
					return true;
				}

				void  zero()
				{
					m_fYaw = m_fPitch = m_fRoll = 0.0;
				}

				float m_fYaw;
				float m_fPitch;
				float m_fRoll;
				
			};

			inline void Rotator::set(float yaw,float pitch,float roll)
			{
				m_fYaw=yaw;
				m_fPitch=pitch;
				m_fRoll=roll;
			}

			inline void Rotator::set(Rotator& rot)
			{
				m_fYaw=rot.m_fYaw;
				m_fPitch=rot.m_fPitch;
				m_fRoll=rot.m_fRoll;
			}

			inline const Rotator& Rotator::operator=(const Rotator& rot)
			{
				m_fYaw=rot.m_fYaw;
				m_fPitch=rot.m_fPitch;
				m_fRoll=rot.m_fRoll;
				return *this;
			}

			inline const Rotator& Rotator::operator=(float* rot)
			{
				m_fYaw=rot[0];
				m_fPitch=rot[1];
				m_fRoll=rot[2];
				return *this;
			}
			//inline 

			
			

		}
	}
}